<template>
  <div>
    <input type="text" v-fofo />
    <p v-color="theColor" @click="changeColor">使用v-color指令控制颜色, 点击变蓝</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      theColor: "red",
    };
  },
  methods: {
    changeColor() {
      this.theColor = 'blue';
    },
  },
  directives: {
    focus: {
      inserted(el) {
        el.focus();
      },
    },
  },
};
</script>

<style>
</style>